﻿import request from '/@/utils/request';
enum Api {
  AddUserBind = '/api/userBind/add',
  DeleteUserBind = '/api/userBind/delete',
  UpdateUserBind = '/api/userBind/update',
  PageUserBind = '/api/userBind/page',
  PageDingUserBind = '/api/userBind/dingPage',
  DetailUserBind = '/api/userBind/detail',
  GetSysUserUserIdDropdown = '/api/userBind/SysUserUserIdDropdown',
  LoginDingDing = '/api/userBind/loginDingDing',
}

// 增加账号绑定
export const addUserBind = (params?: any) =>
	request({
		url: Api.AddUserBind,
		method: 'post',
		data: params,
	});

// 删除账号绑定
export const deleteUserBind = (params?: any) => 
	request({
			url: Api.DeleteUserBind,
			method: 'post',
			data: params,
		});

// 编辑账号绑定
export const updateUserBind = (params?: any) => 
	request({
			url: Api.UpdateUserBind,
			method: 'post',
			data: params,
		});

// 分页查询账号绑定
export const pageUserBind = (params?: any) => 
	request({
			url: Api.PageUserBind,
			method: 'post',
			data: params,
		});

export const pageDingUserBind = (params?: any) => 
	request({
			url: Api.PageDingUserBind,
			method: 'post',
			data: params,
		});

// 详情账号绑定
export const detailUserBind = (id: any) => 
	request({
			url: Api.DetailUserBind,
			method: 'get',
			data: { id },
		});

export const getSysUserUserIdDropdown = () =>
		request({
		url: Api.GetSysUserUserIdDropdown,
		method: 'get'
		});

export const loginDingDing = (params?: any) => 
		request({
				url: Api.LoginDingDing,
				method: 'post',
				data: params,
			});
		